package com.tengfei.blogsystem.service;

import com.tengfei.blogsystem.pojo.User;
import com.tengfei.blogsystem.response.ResponseResult;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @version v1.0
 * @author} feige
 * @date 2021-10-16-16:03
 * @description
 */
public interface IUserService {
    ResponseResult initManagerAccount(User user, HttpServletRequest request);

    ResponseResult register(User user, String emailCode, String checkCode, String checkKey, HttpServletRequest request);

    User findOneByEmail(String email);

    ResponseResult doLogin(String captcha, String captchaKey, User user, HttpServletRequest request, HttpServletResponse response);

    User checkUser(HttpServletRequest request, HttpServletResponse response);

    ResponseResult getUserInfo(String userId
    );

    ResponseResult checkEmail(String email);

    ResponseResult checkUserName(String userName);

    ResponseResult updateUserInfo(HttpServletRequest request, HttpServletResponse response, String userId, User user);

    ResponseResult deleteUserById(HttpServletRequest request, HttpServletResponse response, String userId);

    ResponseResult listUser(int page, int size, HttpServletRequest request, HttpServletResponse response);

    ResponseResult findPassword(String verifyCode, User user,HttpServletRequest request);

    ResponseResult updateEmail(String email, String verifyCode, HttpServletRequest request, HttpServletResponse response);

    ResponseResult doLogout(HttpServletRequest request, HttpServletResponse response);
}
